<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>名师网工作台</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #125E52 0%, #2EB369 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        header {
            text-align: center;
            padding: 40px 0;
            color: white;
        }

        header h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        header p {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        .reminder {
            background: #E2485D;
            color: white;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            margin: 0 auto 30px;
            max-width: 800px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            animation: pulse 2s infinite;
            font-weight: bold;
            font-size: 1.1rem;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); }
        }

        .category {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            padding: 25px;
            margin-bottom: 30px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .category:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        }

        .category-title {
            font-size: 1.5rem;
            color: #125E52;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #eee;
            font-weight: 600;
        }

        .links-container {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
        }

        .nav-link {
            display: block;
            padding: 15px 10px;
            border-radius: 8px;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
            text-align: center;
            flex: 1 1 calc(20% - 15px);
            min-width: 180px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            font-size: 0.9rem;
            font-weight: 500;
        }

        .nav-link:hover {
            background: #0e4a40;
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

        /* 不同类别的协调色块颜色 */
        .category:nth-child(2) .nav-link {
            background: #388E3C; /* 绿色系 */
        }

        .category:nth-child(2) .nav-link:hover {
            background: #66BB6A;
        }

        .category:nth-child(3) .nav-link {
            background: #1976D2; /* 蓝色系 */
        }

        .category:nth-child(3) .nav-link:hover {
            background: #42A5F5;
        }

        .category:nth-child(4) .nav-link {
            background: #7B1FA2; /* 紫色系 */
        }

        .category:nth-child(4) .nav-link:hover {
            background: #AB47BC;
        }

        footer {
            text-align: center;
            color: rgba(255, 255, 255, 0.8);
            padding: 40px 0 20px;
            font-size: 0.9rem;
        }

        @media (max-width: 1200px) {
            .nav-link {
                flex: 1 1 calc(25% - 15px);
            }
        }

        @media (max-width: 992px) {
            .nav-link {
                flex: 1 1 calc(33.333% - 15px);
            }
        }

        @media (max-width: 768px) {
            .nav-link {
                flex: 1 1 calc(50% - 15px);
            }
            
            header h1 {
                font-size: 2rem;
            }
            
            header p {
                font-size: 1rem;
            }
        }

        @media (max-width: 480px) {
            .nav-link {
                flex: 1 1 100%;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>浙江省基础教育类名师工作站</h1>
            <p>常用管理功能导航</p>
        </header>

        <div id="reminder-container"></div>

        <main id="navigation-container">
            <!-- 导航内容将通过JavaScript动态生成 -->
        </main>

        <footer>
            <p>© 2025-2028 浙江省基础教育类名师工作站</p>
        </footer>
    </div>

    <script>
        // 网站链接数据
        const navigationData = [
            {
                title: "每日巡查（登录后使用）",
                color: "#388E3C",
                hoverColor: "#66BB6A",
                links: [
                    { text: "直播审核", url: "https://ms.zjer.cn/index.php?r=studio/admin/livelist" },
                    { text: "公告审核", url: "https://ms.zjer.cn/index.php?r=studio/admin/noticelist&send=2" },
                    { text: "资讯审核", url: "https://ms.zjer.cn/index.php?r=studio/admin/newslist&send=2" },
                    { text: "荣誉审核", url: "https://ms.zjer.cn/index.php?r=studio/admin/HonourList&hType=station" },
                    { text: "专题审核", url: "https://ms.zjer.cn/index.php?r=studio/admin/restopicsclass&nameType=1" },
                    { text: "研修活动案例", url: "https://ms.zjer.cn/index.php?r=studio/admin/caselist&case_type=1" },
                    { text: "骨干教师成长案例", url: "https://ms.zjer.cn/index.php?r=studio/admin/DescriptionList&send=2" },
                    { text: "资源建设应用案例", url: "https://ms.zjer.cn/index.php?r=studio/admin/caselist&case_type=2" },
                    { text: "工作室运行管理案例", url: "https://ms.zjer.cn/index.php?r=studio/admin/caselist&case_type=3" },
                    { text: "其它专题案例", url: "https://ms.zjer.cn/index.php?r=studio/admin/caselist&case_type=4" }
                ]
            },
            {
                title: "管理页面（登录后使用）",
                color: "#1976D2",
                hoverColor: "#42A5F5",
                links: [
                    { text: "学带申请开关", url: "https://ms.zjer.cn/index.php?r=studio/admin/applyconfig" },
                    { text: "资讯发布", url: "https://ms.zjer.cn/index.php?r=studio/admin/addnewsinfo" },
                    { text: "公告发布", url: "https://ms.zjer.cn/index.php?r=studio/admin/creataffiche" },
                    { text: "媒体宣传发布", url: "https://ms.zjer.cn/index.php?r=studio/admin/addinfo&classid=2" },
                    { text: "工作站统计", url: "https://ms.zjer.cn/index.php?r=studio/admin/contentstatistics" },
                    { text: "后台管理登录", url: "#admin-login", isDynamic: true }, //后台登录页用脚本生成，自动添加8位日期参数      
                    { text: "后台管理首页", url: "https://ms.zjer.cn/index.php?r=studio/admin" }     
        
                ]
            },
            {
                title: "常用导航",
                color: "#7B1FA2",
                hoverColor: "#AB47BC",
                links: [
                    { text: "名师网首页", url: "https://ms.zjer.cn/" },
                    { text: "基础教育站", url: "https://ms.zjer.cn/index.php?r=studio/workstation&wid=27" },
                    { text: "RGF工作室", url: "https://ms.zjer.cn/index.php?r=studio/index/index&sid=531" },
                    { text: "省教育技术中心", url: "https://www.zjedu.org/" }
                ]
            }
        ];

        // DOM加载完成后执行
        document.addEventListener('DOMContentLoaded', function() {
            // 设置登录链接的日期参数
            const now = new Date();
            const year = now.getFullYear();
            const month = String(now.getMonth() + 1).padStart(2, '0');
            const day = String(now.getDate()).padStart(2, '0');
            const dateStr = year + month + day;
            
            // 更新后台管理登录链接 (注意索引已改变)
            navigationData[1].links[5].url = `https://ms.zjer.cn/index.php?r=studio/admin/login&islogin=${dateStr}`;
            
            // 检查是否需要显示提醒
            checkAndShowReminder(now);
            
            // 渲染导航内容
            renderNavigation();
        });

        // 每月28日后显示提醒导出工作室数据
        function checkAndShowReminder(date) {
            const day = date.getDate();
            const lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
            
            // 检查是否在每月28日至月底期间
            if (day >= 28 && day <= lastDay) {
                const container = document.getElementById('reminder-container');
                const reminder = document.createElement('div');
                reminder.className = 'reminder';
                
                const year = date.getFullYear();
                const month = String(date.getMonth() + 1).padStart(2, '0');
                const dayStr = String(date.getDate()).padStart(2, '0');
                const formattedDate = `${year}-${month}-${dayStr}`;
                
                reminder.textContent = `${formattedDate}：月底了，请记得及时统计工作室建设数据并导出保存。`;
                container.appendChild(reminder);
            }
        }

        // 渲染导航内容
        function renderNavigation() {
            const container = document.getElementById('navigation-container');
            
            navigationData.forEach(category => {
                // 创建分类容器
                const categoryElement = document.createElement('div');
                categoryElement.className = 'category';
                
                // 创建分类标题
                const titleElement = document.createElement('div');
                titleElement.className = 'category-title';
                titleElement.textContent = category.title;
                categoryElement.appendChild(titleElement);
                
                // 创建链接容器
                const linksContainer = document.createElement('div');
                linksContainer.className = 'links-container';
                
                // 创建链接元素
                category.links.forEach(link => {
                    const linkElement = document.createElement('a');
                    linkElement.href = link.url;
                    linkElement.className = 'nav-link';
                    linkElement.textContent = link.text;
                    linkElement.target = '_blank';
                    
                    // 如果是动态链接，则添加点击事件
                    if (link.isDynamic) {
                        linkElement.addEventListener('click', function(e) {
                            e.preventDefault();
                            const now = new Date();
                            const year = now.getFullYear();
                            const month = String(now.getMonth() + 1).padStart(2, '0');
                            const day = String(now.getDate()).padStart(2, '0');
                            const dateStr = year + month + day;
                            const dynamicUrl = `https://ms.zjer.cn/index.php?r=studio/admin/login&islogin=${dateStr}`;
                            window.open(dynamicUrl, '_blank');
                        });
                    }
                    
                    // 设置颜色
                    linkElement.style.background = category.color;
                    
                    // 添加悬停效果
                    linkElement.addEventListener('mouseenter', function() {
                        this.style.background = category.hoverColor;
                    });
                    
                    linkElement.addEventListener('mouseleave', function() {
                        this.style.background = category.color;
                    });
                    
                    linksContainer.appendChild(linkElement);
                });
                
                categoryElement.appendChild(linksContainer);
                container.appendChild(categoryElement);
            });
        }
    </script>
</body>
</html>